package com.wwinsoft.framework.dao.workflow;

import java.util.List;
import java.util.Map;

import org.activiti.engine.task.Task;
import org.springframework.stereotype.Repository;

import com.wwinsoft.framework.entity.security.User;
import com.wwinsoft.modules.orm.Page;
import com.wwinsoft.modules.orm.mybatis.MyBatisDao;

/**
 * @author: Tim Chen
 * @since 1.0
 */
@Repository
@SuppressWarnings("unchecked")
public class TaskQueryDao extends MyBatisDao{
    public Page<? extends Task> searchTaskPage(Page<? extends Task> page, Map filter) {
           return selectPage(page, "Task.selectTaskPage" ,filter) ;
    }

    public List<? extends Task> searchTaskList(Map filter){
        return getSqlSession().selectList("Task.selectTaskPage" ,filter);
    }

    public List<User> selectTaskCandidateUsers(Map filter){
        return getSqlSession().selectList("Task.selectTaskCandidateUsers" ,filter);
    }

}
